package com.learn.config;

import org.springframework.context.annotation.*;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author DJJ_F
 * @version 1.0
 * @date 2025/02/11
 * @description spring配置类
 * 配置 组件扫描，导入外部配置文件，导入dataSource和mybatis的bean, 开启事务
 */
@Configuration
@ComponentScan("com.learn.service")
// 导入外部配置文件
@PropertySource("classpath:jdbc.properties")
// 导入外部配置类
@Import({DataSourceConfig.class, MyBatisConfig.class})
@EnableTransactionManagement
public class SpringConfig {
}
